package p270jp.pxv.android.viewholder;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.ViewGroup;
import androidx.recyclerview.widget.RecyclerView;
import p216hn.DefaultConstructorMarker;
import p270jp.pxv.android.R;
import p270jp.pxv.android.model.pixiv_sketch.LiveWebSocketMessage;
import p274k2.ContextCompat;
import p314lg.ViewHolderRenewalLiveChatBinding;
import p325m0.MutabilityOwnership;
import p371nj.LiveChatState;
import p652yj.C7346b;

/* compiled from: RenewalLiveChatViewHolder.kt */
/* renamed from: jp.pxv.android.viewholder.RenewalLiveChatViewHolder */
/* loaded from: classes2.dex */
public final class RenewalLiveChatViewHolder extends RecyclerView.AbstractC0819y {
    private final ViewHolderRenewalLiveChatBinding binding;
    public static final Companion Companion = new Companion(null);
    public static final int $stable = 8;

    /* compiled from: RenewalLiveChatViewHolder.kt */
    /* renamed from: jp.pxv.android.viewholder.RenewalLiveChatViewHolder$Companion */
    /* loaded from: classes2.dex */
    public static final class Companion {
        private Companion() {
        }

        public /* synthetic */ Companion(DefaultConstructorMarker eVar) {
            this();
        }

        public final RenewalLiveChatViewHolder createViewHolder(ViewGroup viewGroup) {
            ViewHolderRenewalLiveChatBinding o8Var = (ViewHolderRenewalLiveChatBinding) C7346b.m327a(viewGroup, "parent", R.layout.view_holder_renewal_live_chat, viewGroup, false);
            MutabilityOwnership.m3746l(o8Var, "binding");
            return new RenewalLiveChatViewHolder(o8Var, null);
        }
    }

    private RenewalLiveChatViewHolder(ViewHolderRenewalLiveChatBinding o8Var) {
        super(o8Var.f2666e);
        this.binding = o8Var;
    }

    public /* synthetic */ RenewalLiveChatViewHolder(ViewHolderRenewalLiveChatBinding o8Var, DefaultConstructorMarker eVar) {
        this(o8Var);
    }

    public final void display(LiveChatState.C5358b bVar) {
        MutabilityOwnership.m3745m(bVar, LiveWebSocketMessage.TYPE_CHAT);
        Context context = this.binding.f2666e.getContext();
        Object obj = ContextCompat.f19963a;
        Drawable b = ContextCompat.C4472c.m4259b(context, R.drawable.bg_live_chat);
        MutabilityOwnership.m3747j(b);
        b.mutate().setTint(bVar.f23881d);
        this.binding.f22049q.setBackground(b);
        this.binding.mo3779z(bVar);
        this.binding.m11392i();
    }
}
